/**
 * Project Name:BasePagingRepository.java
 * File Name:BasePagingRepository.java
 * Date:2019/4/6 18:05
 * Copyright (c) 2019, zhang.xiangyu@foxmail.com All Rights Reserved.
 */
package com.meatball.base.repository;

import com.meatball.base.repository.matcher.MeatballExample;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * @Title: BasePagingRepository.java
 * @Description: todo(自定义查询)
 * @Author: 張翔宇
 * @Date: 2019/4/6 18:05
 * @Version: V1.0
 */
public interface BasePagingRepository<T> {
    Mono<T> findPage (MeatballExample<T> example, Pageable pageable);

    /**
     * @title: findList
     * @description: todo(查询集合数据)
     * @params: [example]
     * @return: reactor.core.publisher.Flux<T>    返回类型
     * @author: 張翔宇
     * @date: 2019/4/13 17:21
     */
    Flux<T> findList(MeatballExample<T> example, Sort sort);
}
